Skip to content

Conversation

@OttoAllmendinger
Copy link
Contributor

@OttoAllmendinger OttoAllmendinger commented Nov 3, 2025

This PR adds PSBT (Partially Signed Bitcoin Transaction) parsing
capabilities to the wasm-utxo cli module along with several improvements to
the codebase organization and test infrastructure.

Key changes include:

  • Add raw PSBT parser for examining low-level key-value structures as
    defined in BIP-174
  • Implement transaction parsing via new tx parse command
  • Reorganize code into better modularized components
  • Improve fixtures handling with support for different networks and
    signature states
  • Update fixture directory path from 'tests' to 'test'
  • Fix clippy warnings and remove unnecessary module nesting
  • Enhance error handling for file reading operations
  • Support multiple input formats (hex/base64/raw)
  • Reduce binary size by moving non-test code behind test attributes

Reference: BTC-2652

OttoAllmendinger and others added 6 commits November 3, 2025 13:02
Update the path reference in fixtures_directory() function and move all
fixture files to the new location.

Issue: BTC-2652

Co-authored-by: llm-git <llm-git@ttll.de>
This is crucial documentation that outlines the PSBT format, which will
help guide implementation of the CLI parser for Bitcoin raw transactions.

Issue: BTC-2652

Co-authored-by: llm-git <llm-git@ttll.de>
Simplify the test file structure by removing the redundant tests module,
as the file is already within a tests module.

Issue: BTC-2652

Co-authored-by: llm-git <llm-git@ttll.de>
Implement a new parser module for examining low-level PSBT structure with
raw key-value pairs as defined in BIP-174. This exposes internal details
like proprietary keys, raw type IDs, and byte structure that standard
parsers might hide.

Also add test utilities for loading PSBT fixtures across different networks
and signature states.

Issue: BTC-2652

Co-authored-by: llm-git <llm-git@ttll.de>
Reorganize code structure with better modularization and add transaction
parsing capability. This includes:
- Create a shared input handling module
- Support for transaction parsing via new `tx parse` command
- Move parsers into organized submodules
- Improve file reading with better error handling
- Add support for decoding different input formats (hex/base64/raw)
- Fix clippy warnings in existing code

Issue: BTC-2652

Co-authored-by: llm-git <llm-git@ttll.de>
Simplified the fixture handling code and tree rendering utilities. Moved
non-test-related code behind #[cfg(test)] attributes to reduce binary size.
Removed unused color schemes and unnecessary public exports.

Issue: BTC-2652

Co-authored-by: llm-git <llm-git@ttll.de>
@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review November 3, 2025 12:06
@OttoAllmendinger OttoAllmendinger requested a review from a team as a code owner November 3, 2025 12:06
@OttoAllmendinger OttoAllmendinger changed the title feat(wasm-utxo): implement PSBT parsing and improve test infrastructure feat(wasm-utxo/cli): implement PSBT parsing and improve test infrastructure Nov 3, 2025
@OttoAllmendinger OttoAllmendinger merged commit 80e6067 into master Nov 4, 2025
1 check passed
@OttoAllmendinger OttoAllmendinger deleted the BTC-2652.cli-parse-node-raw branch November 4, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants